package cc.wsyw126.java.collection.map;

import java.util.LinkedHashSet;

/**
 * Created by junpeng.yang on 16/9/1.
 */
public class TestLinkedHashSet {
    public static void main(String[] args) {
        LinkedHashSet<Integer> linkedHashSet = new LinkedHashSet<>();
        linkedHashSet.add(1);
        linkedHashSet.add(2);
        linkedHashSet.add(3);

        linkedHashSet.stream().forEach(n -> System.out.println("n = " + n));


        linkedHashSet.add(1);
        linkedHashSet.stream().forEach(n -> System.out.println("n = " + n));


    }
}
